Skip to content

Implement a hex_to_bytes and hex_digit_value text utilities#2498

Merged
jviotti merged 1 commit into
mainfrom
hex-bytes
Jun 12, 2026
Merged

Implement a hex_to_bytes and hex_digit_value text utilities#2498
jviotti merged 1 commit into
mainfrom
hex-bytes

Conversation

@jviotti

@jviotti jviotti commented Jun 12, 2026

Copy link
Copy Markdown
Member

Signed-off-by: Juan Cruz Viotti jv@jviotti.com

Review in cubic

Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/gcc)

Details
Benchmark suite Current: 42f6e9a Previous: 49a6a84 Ratio
GZIP_Compress_ISO_Language_Set_3_Locations 39245431.61111337 ns/iter 39265969.833334364 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 4017874.5862066397 ns/iter 4025557.3160919435 ns/iter 1.00
GZIP_Compress_ISO_Language_Set_3_Schema 2270695.5649348935 ns/iter 2262310.6731390096 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 281043.7851758556 ns/iter 276091.27116510645 ns/iter 1.02
HTML_Build_Table_100000 72603400.10000163 ns/iter 72502794.1999997 ns/iter 1.00
HTML_Render_Table_100000 1936624.9035815087 ns/iter 1931653.451523683 ns/iter 1.00
JSONL_Parse_Large 12578992.490566548 ns/iter 12372814.315789696 ns/iter 1.02
JSONL_Parse_Large_GZIP 13856514.23529408 ns/iter 13900852.509802425 ns/iter 1.00
URITemplateRouter_Create 30103.20917399557 ns/iter 31858.01593440106 ns/iter 0.94
URITemplateRouter_Match 146.7190661842388 ns/iter 145.0717496939503 ns/iter 1.01
URITemplateRouter_Match_BasePath 172.89162510089457 ns/iter 172.17790699166994 ns/iter 1.00
URITemplateRouterView_Restore 8818.259648991352 ns/iter 8607.972872314409 ns/iter 1.02
URITemplateRouterView_Match 124.66008120054477 ns/iter 125.13210152857059 ns/iter 1.00
URITemplateRouterView_Match_BasePath 143.23065219119783 ns/iter 143.00567870209758 ns/iter 1.00
URITemplateRouterView_Arguments 451.66564202863276 ns/iter 453.6609641887432 ns/iter 1.00
Pointer_Object_Traverse 30.44694192926205 ns/iter 29.438313124810072 ns/iter 1.03
Pointer_Object_Try_Traverse 22.82665441065974 ns/iter 22.762115617664538 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 169.5244037141599 ns/iter 167.98822598445983 ns/iter 1.01
Pointer_Walker_Schema_ISO_Language 1898070.7613939585 ns/iter 1870885.622994371 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/0 1533303.1186810832 ns/iter 1542279.796460189 ns/iter 0.99
Pointer_Maybe_Tracked_Deeply_Nested/1 1644653.2978723587 ns/iter 1643827.6361502619 ns/iter 1.00
Pointer_Position_Tracker_Get_Deeply_Nested 659.923454183139 ns/iter 593.8093993262765 ns/iter 1.11
JSON_Array_Of_Objects_Unique 413.91618766952973 ns/iter 400.35680978874177 ns/iter 1.03
JSON_Parse_1 7651.821421491544 ns/iter 7588.517010674877 ns/iter 1.01
JSON_Parse_Real 6671.9457807453655 ns/iter 6369.25964186692 ns/iter 1.05
JSON_Parse_Decimal 9666.5925447737 ns/iter 9664.078932894201 ns/iter 1.00
JSON_Parse_Schema_ISO_Language 5175878.411764041 ns/iter 5142175.132353005 ns/iter 1.01
JSON_Parse_Integer 4912.423357765577 ns/iter 4822.220723359454 ns/iter 1.02
JSON_Parse_String_NonSSO_Plain 8719.947938239706 ns/iter 8817.839540896686 ns/iter 0.99
JSON_Parse_String_SSO_Plain 3795.4478364447477 ns/iter 3865.2428934874956 ns/iter 0.98
JSON_Parse_String_Escape_Heavy 19457.53224098538 ns/iter 19433.85602188371 ns/iter 1.00
JSON_Parse_Object_Short_Keys 11619.337226422682 ns/iter 11236.573753161774 ns/iter 1.03
JSON_Parse_Object_Scalar_Properties 5808.033368679033 ns/iter 5716.562411019062 ns/iter 1.02
JSON_Parse_Object_Array_Properties 9265.978221390638 ns/iter 9251.247305886029 ns/iter 1.00
JSON_Parse_Object_Object_Properties 8847.089841872983 ns/iter 8749.332032970819 ns/iter 1.01
JSON_Parse_Nested_Containers 75948.0475687099 ns/iter 72864.61093078284 ns/iter 1.04
JSON_From_String_Copy 20.418820911582053 ns/iter 20.439732971406126 ns/iter 1.00
JSON_From_String_Temporary 17.065786363803927 ns/iter 17.069707264770322 ns/iter 1.00
JSON_Number_To_Double 20.051859584060296 ns/iter 20.05172339908966 ns/iter 1.00
JSON_Object_At_Last_Key/8 6.741446114346261 ns/iter 6.6805491945425715 ns/iter 1.01
JSON_Object_At_Last_Key/32 23.61699032477791 ns/iter 23.5498680831306 ns/iter 1.00
JSON_Object_At_Last_Key/128 91.21125080183269 ns/iter 91.0705111624057 ns/iter 1.00
JSON_Object_At_Last_Key/512 380.0898801323454 ns/iter 378.66184052279954 ns/iter 1.00
JSON_Fast_Hash_Helm_Chart_Lock 56.11700206458634 ns/iter 55.185186035162424 ns/iter 1.02
JSON_Equality_Helm_Chart_Lock 166.19362274108724 ns/iter 167.241590766882 ns/iter 0.99
JSON_Divisible_By_Decimal 231.44561021617443 ns/iter 231.51907858537172 ns/iter 1.00
JSON_String_Equal/10 5.3230827901449755 ns/iter 5.322316484412252 ns/iter 1.00
JSON_String_Equal/100 6.032890138459673 ns/iter 6.036623137026535 ns/iter 1.00
JSON_String_Equal_Small_By_Perfect_Hash/10 0.7125137656818955 ns/iter 0.714261031205502 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 22.011135405449412 ns/iter 21.934419631850464 ns/iter 1.00
JSON_String_Fast_Hash/10 1.0561334892408056 ns/iter 1.0548501680842128 ns/iter 1.00
JSON_String_Fast_Hash/100 1.0560886640757312 ns/iter 1.0555386042689545 ns/iter 1.00
JSON_String_Key_Hash/10 1.4072910793666369 ns/iter 1.4070089050418346 ns/iter 1.00
JSON_String_Key_Hash/100 15.099073769354467 ns/iter 14.75720147962526 ns/iter 1.02
JSON_Object_Defines_Miss_Same_Length 3.872479265349128 ns/iter 3.8698214664819663 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Small 3.88071080261404 ns/iter 3.8688908612271193 ns/iter 1.00
JSON_Object_Defines_Miss_Too_Large 3.520900164438015 ns/iter 3.517608002603276 ns/iter 1.00
Regex_Lower_S_Or_Upper_S_Asterisk 1.0567604432619937 ns/iter 1.0563411719959508 ns/iter 1.00
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 0.7040110011062848 ns/iter 0.7060092012771056 ns/iter 1.00
Regex_Period_Asterisk 0.7046623839803305 ns/iter 0.7034462200717481 ns/iter 1.00
Regex_Group_Period_Asterisk_Group 1.0927714226156051 ns/iter 1.0547692399230273 ns/iter 1.04
Regex_Period_Plus 1.0559724572997542 ns/iter 1.0545016107437073 ns/iter 1.00
Regex_Period 0.7039173102248065 ns/iter 0.7034224718494542 ns/iter 1.00
Regex_Caret_Period_Plus_Dollar 0.7054621337909651 ns/iter 0.7033199265059648 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 1.0557094723105136 ns/iter 1.0547192983782088 ns/iter 1.00
Regex_Caret_Period_Asterisk_Dollar 1.056524751119152 ns/iter 1.0550313911515896 ns/iter 1.00
Regex_Caret_Group_Period_Asterisk_Group_Dollar 0.7038183942302174 ns/iter 0.70345606484455 ns/iter 1.00
Regex_Caret_X_Hyphen 4.219527451758623 ns/iter 4.219580359989697 ns/iter 1.00
Regex_Period_Md_Dollar 46.927696129450695 ns/iter 34.68227980565839 ns/iter 1.35
Regex_Caret_Slash_Period_Asterisk 4.220748365565019 ns/iter 4.220076101507198 ns/iter 1.00
Regex_Caret_Period_Range_Dollar 0.8425817148789694 ns/iter 0.8385269249797368 ns/iter 1.00
Regex_Nested_Backtrack 51.09504418190748 ns/iter 41.44184202151464 ns/iter 1.23

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (macos/llvm)

Details
Benchmark suite Current: 42f6e9a Previous: 49a6a84 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 1.9997550453824222 ns/iter 1.9655837602635244 ns/iter 1.02
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 1.9887594460320208 ns/iter 1.955524949378927 ns/iter 1.02
Regex_Period_Asterisk 2.1089185974454208 ns/iter 2.3964556886460078 ns/iter 0.88
Regex_Group_Period_Asterisk_Group 2.167824671091108 ns/iter 2.0580797609462183 ns/iter 1.05
Regex_Period_Plus 2.6599502578837515 ns/iter 2.189199718963504 ns/iter 1.22
Regex_Period 2.9718434464309325 ns/iter 2.319516187882353 ns/iter 1.28
Regex_Caret_Period_Plus_Dollar 2.6179580807792977 ns/iter 2.0968634761456677 ns/iter 1.25
Regex_Caret_Group_Period_Plus_Group_Dollar 2.840070870466295 ns/iter 2.282783807826128 ns/iter 1.24
Regex_Caret_Period_Asterisk_Dollar 2.138613200799679 ns/iter 2.032779749529605 ns/iter 1.05
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.2437511836078072 ns/iter 2.124548969881979 ns/iter 1.06
Regex_Caret_X_Hyphen 7.493952048728331 ns/iter 7.206908196898357 ns/iter 1.04
Regex_Period_Md_Dollar 24.534522919621363 ns/iter 28.689382147902144 ns/iter 0.86
Regex_Caret_Slash_Period_Asterisk 5.699027615091636 ns/iter 6.547606948777863 ns/iter 0.87
Regex_Caret_Period_Range_Dollar 2.572995675266513 ns/iter 2.842218639863066 ns/iter 0.91
Regex_Nested_Backtrack 30.426986275321713 ns/iter 31.743491022838167 ns/iter 0.96
JSON_Array_Of_Objects_Unique 405.082893849403 ns/iter 435.7751922623525 ns/iter 0.93
JSON_Parse_1 4344.799320698217 ns/iter 4447.641482237752 ns/iter 0.98
JSON_Parse_Real 5850.257740203856 ns/iter 6373.597542317736 ns/iter 0.92
JSON_Parse_Decimal 7220.382560931 ns/iter 7655.866909237971 ns/iter 0.94
JSON_Parse_Schema_ISO_Language 4560418.859649371 ns/iter 4855101.607692911 ns/iter 0.94
JSON_Parse_Integer 3692.6270300925953 ns/iter 3968.8522946870507 ns/iter 0.93
JSON_Parse_String_NonSSO_Plain 4436.92463146046 ns/iter 5192.687495067054 ns/iter 0.85
JSON_Parse_String_SSO_Plain 2368.9416116654124 ns/iter 2384.49145389083 ns/iter 0.99
JSON_Parse_String_Escape_Heavy 21297.435605170853 ns/iter 24328.902522152923 ns/iter 0.88
JSON_Parse_Object_Short_Keys 7222.532161295703 ns/iter 6445.447124116535 ns/iter 1.12
JSON_Parse_Object_Scalar_Properties 4010.6301976040018 ns/iter 3823.0355225086773 ns/iter 1.05
JSON_Parse_Object_Array_Properties 5119.90477829271 ns/iter 4070.0154692833157 ns/iter 1.26
JSON_Parse_Object_Object_Properties 4100.63647684575 ns/iter 4278.313162035487 ns/iter 0.96
JSON_Parse_Nested_Containers 28955.659794239276 ns/iter 30530.936867562334 ns/iter 0.95
JSON_From_String_Copy 28.763051678229033 ns/iter 32.10287579974805 ns/iter 0.90
JSON_From_String_Temporary 23.37015961615463 ns/iter 25.940283442501197 ns/iter 0.90
JSON_Number_To_Double 38.01637229228532 ns/iter 35.8876837442734 ns/iter 1.06
JSON_Object_At_Last_Key/8 3.8884838074516703 ns/iter 3.7863876433572834 ns/iter 1.03
JSON_Object_At_Last_Key/32 13.44189680179578 ns/iter 13.581184985804825 ns/iter 0.99
JSON_Object_At_Last_Key/128 69.51500420512882 ns/iter 66.67675773913099 ns/iter 1.04
JSON_Object_At_Last_Key/512 242.72389213617555 ns/iter 197.57102207556431 ns/iter 1.23
JSON_Fast_Hash_Helm_Chart_Lock 73.1918641118798 ns/iter 66.40888238228052 ns/iter 1.10
JSON_Equality_Helm_Chart_Lock 175.52509442378243 ns/iter 152.76090721055908 ns/iter 1.15
JSON_Divisible_By_Decimal 232.2876485805803 ns/iter 182.53726469235434 ns/iter 1.27
JSON_String_Equal/10 8.5402077194383 ns/iter 7.247319543385876 ns/iter 1.18
JSON_String_Equal/100 8.19118856372657 ns/iter 6.808291227193126 ns/iter 1.20
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9774406798997597 ns/iter 0.7905414423359165 ns/iter 1.24
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 4.682830356993267 ns/iter 3.4407898276064484 ns/iter 1.36
JSON_String_Fast_Hash/10 3.0013842311902086 ns/iter 2.497283527881215 ns/iter 1.20
JSON_String_Fast_Hash/100 2.998480979975159 ns/iter 2.2635655132406667 ns/iter 1.32
JSON_String_Key_Hash/10 2.0994719854483477 ns/iter 1.5145602593554668 ns/iter 1.39
JSON_String_Key_Hash/100 3.053412685351178 ns/iter 2.8360988654729704 ns/iter 1.08
JSON_Object_Defines_Miss_Same_Length 3.3697715968081607 ns/iter 3.3461654985478315 ns/iter 1.01
JSON_Object_Defines_Miss_Too_Small 3.3667851593227507 ns/iter 3.0457232842691404 ns/iter 1.11
JSON_Object_Defines_Miss_Too_Large 3.376058184778344 ns/iter 2.826926700595713 ns/iter 1.19
Pointer_Object_Traverse 18.739042942885742 ns/iter 14.954556179292023 ns/iter 1.25
Pointer_Object_Try_Traverse 33.780609111978684 ns/iter 25.230648542298493 ns/iter 1.34
Pointer_Push_Back_Pointer_To_Weak_Pointer 223.33389627280465 ns/iter 167.84010523527897 ns/iter 1.33
Pointer_Walker_Schema_ISO_Language 3604669.2670449363 ns/iter 3049708.528571197 ns/iter 1.18
Pointer_Maybe_Tracked_Deeply_Nested/0 1409090.0681459089 ns/iter 971202.6449933925 ns/iter 1.45
Pointer_Maybe_Tracked_Deeply_Nested/1 2148419.366197129 ns/iter 1308770.1955782904 ns/iter 1.64
Pointer_Position_Tracker_Get_Deeply_Nested 528.3456198783086 ns/iter 365.48208562640724 ns/iter 1.45
URITemplateRouter_Create 35436.68010385514 ns/iter 23407.40329794275 ns/iter 1.51
URITemplateRouter_Match 227.46643831264427 ns/iter 206.98878567320486 ns/iter 1.10
URITemplateRouter_Match_BasePath 280.99969578128287 ns/iter 232.2996873566834 ns/iter 1.21
URITemplateRouterView_Restore 17296.4464496026 ns/iter 10156.6172740349 ns/iter 1.70
URITemplateRouterView_Match 170.17116122532644 ns/iter 131.72360337559863 ns/iter 1.29
URITemplateRouterView_Match_BasePath 214.4829127367738 ns/iter 142.06853458970863 ns/iter 1.51
URITemplateRouterView_Arguments 496.76538652186923 ns/iter 390.1977371506192 ns/iter 1.27
JSONL_Parse_Large 16953430.56410191 ns/iter 12376861.105263073 ns/iter 1.37
JSONL_Parse_Large_GZIP 24006968.75000108 ns/iter 13720141.038460882 ns/iter 1.75
HTML_Build_Table_100000 106082734.3750077 ns/iter 64413143.44445144 ns/iter 1.65
HTML_Render_Table_100000 7230130.705262414 ns/iter 3835556.0426355996 ns/iter 1.89
GZIP_Compress_ISO_Language_Set_3_Locations 41090041.624997295 ns/iter 29159714.99999614 ns/iter 1.41
GZIP_Decompress_ISO_Language_Set_3_Locations 10566123.551723586 ns/iter 5805703.341880118 ns/iter 1.82
GZIP_Compress_ISO_Language_Set_3_Schema 2910394.4552525543 ns/iter 1811036.1484019288 ns/iter 1.61
GZIP_Decompress_ISO_Language_Set_3_Schema 362654.2990142364 ns/iter 294260.6603440675 ns/iter 1.23

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (linux/llvm)

Details
Benchmark suite Current: 42f6e9a Previous: 49a6a84 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 2.18859486260415 ns/iter 2.4731475138415466 ns/iter 0.88
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 2.1794607104501806 ns/iter 2.4625955616980995 ns/iter 0.89
Regex_Period_Asterisk 2.186301763983407 ns/iter 2.4625559435053246 ns/iter 0.89
Regex_Group_Period_Asterisk_Group 2.1902096050450512 ns/iter 2.4616074471778653 ns/iter 0.89
Regex_Period_Plus 2.4919427644193037 ns/iter 3.867972334280774 ns/iter 0.64
Regex_Period 2.1806028831288153 ns/iter 3.5146849082586953 ns/iter 0.62
Regex_Caret_Period_Plus_Dollar 2.180939645439633 ns/iter 3.5211071360107127 ns/iter 0.62
Regex_Caret_Group_Period_Plus_Group_Dollar 2.493514661182212 ns/iter 3.5421516175090835 ns/iter 0.70
Regex_Caret_Period_Asterisk_Dollar 2.188751649854513 ns/iter 2.7053991811735703 ns/iter 0.81
Regex_Caret_Group_Period_Asterisk_Group_Dollar 2.1805931257331284 ns/iter 2.4606519008550785 ns/iter 0.89
Regex_Caret_X_Hyphen 5.302466488163784 ns/iter 5.290682280148268 ns/iter 1.00
Regex_Period_Md_Dollar 27.49542780650413 ns/iter 26.666764986706777 ns/iter 1.03
Regex_Caret_Slash_Period_Asterisk 5.92360850987181 ns/iter 7.396184045623415 ns/iter 0.80
Regex_Caret_Period_Range_Dollar 2.491598685398408 ns/iter 3.515843939337896 ns/iter 0.71
Regex_Nested_Backtrack 37.10587487043388 ns/iter 37.63270278104759 ns/iter 0.99
JSON_Array_Of_Objects_Unique 479.50379841029746 ns/iter 499.04621625050476 ns/iter 0.96
JSON_Parse_1 4845.775238148392 ns/iter 4598.581544753716 ns/iter 1.05
JSON_Parse_Real 5075.07373378079 ns/iter 5018.131230143119 ns/iter 1.01
JSON_Parse_Decimal 7529.463922289127 ns/iter 7441.620523744299 ns/iter 1.01
JSON_Parse_Schema_ISO_Language 3429142.639024354 ns/iter 3508629.980000251 ns/iter 0.98
JSON_Parse_Integer 3706.1442624864476 ns/iter 3888.0301806950883 ns/iter 0.95
JSON_Parse_String_NonSSO_Plain 5021.314198034724 ns/iter 5113.306375336498 ns/iter 0.98
JSON_Parse_String_SSO_Plain 2757.863110719479 ns/iter 2867.3091066395878 ns/iter 0.96
JSON_Parse_String_Escape_Heavy 14272.378620453303 ns/iter 14728.816801127956 ns/iter 0.97
JSON_Parse_Object_Short_Keys 7789.7919226605345 ns/iter 7952.321126983406 ns/iter 0.98
JSON_Parse_Object_Scalar_Properties 4140.087115380246 ns/iter 4028.661669027591 ns/iter 1.03
JSON_Parse_Object_Array_Properties 5430.941209221932 ns/iter 5512.36059529239 ns/iter 0.99
JSON_Parse_Object_Object_Properties 5501.391022119236 ns/iter 5605.407424289806 ns/iter 0.98
JSON_Parse_Nested_Containers 44373.84129293191 ns/iter 44829.743062233436 ns/iter 0.99
JSON_From_String_Copy 19.35689113811822 ns/iter 21.109255409264414 ns/iter 0.92
JSON_From_String_Temporary 17.156887799471907 ns/iter 17.94232595655204 ns/iter 0.96
JSON_Number_To_Double 24.15179205118182 ns/iter 23.949053981361036 ns/iter 1.01
JSON_Object_At_Last_Key/8 3.7300683210178036 ns/iter 3.878474982465095 ns/iter 0.96
JSON_Object_At_Last_Key/32 11.912116321539854 ns/iter 13.01362141875186 ns/iter 0.92
JSON_Object_At_Last_Key/128 48.302338801544884 ns/iter 46.78863187356217 ns/iter 1.03
JSON_Object_At_Last_Key/512 384.15299153976054 ns/iter 366.51531092580643 ns/iter 1.05
JSON_Fast_Hash_Helm_Chart_Lock 56.74352466532633 ns/iter 68.55217060629394 ns/iter 0.83
JSON_Equality_Helm_Chart_Lock 198.65408639022087 ns/iter 188.76602571943133 ns/iter 1.05
JSON_Divisible_By_Decimal 253.90560037394147 ns/iter 259.86356788383347 ns/iter 0.98
JSON_String_Equal/10 6.554331723932909 ns/iter 6.334737986308736 ns/iter 1.03
JSON_String_Equal/100 7.175344293334681 ns/iter 7.038040231802329 ns/iter 1.02
JSON_String_Equal_Small_By_Perfect_Hash/10 0.9374993049749326 ns/iter 1.0549809276592919 ns/iter 0.89
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 14.940449893016376 ns/iter 12.379116835332686 ns/iter 1.21
JSON_String_Fast_Hash/10 2.181614324356237 ns/iter 2.1117218573539156 ns/iter 1.03
JSON_String_Fast_Hash/100 2.1816859012980254 ns/iter 2.110795576397238 ns/iter 1.03
JSON_String_Key_Hash/10 2.7442361551378824 ns/iter 2.461210479195186 ns/iter 1.11
JSON_String_Key_Hash/100 9.061669334086934 ns/iter 7.73345347548392 ns/iter 1.17
JSON_Object_Defines_Miss_Same_Length 2.719919903316511 ns/iter 2.858505564242407 ns/iter 0.95
JSON_Object_Defines_Miss_Too_Small 3.7569576128747033 ns/iter 4.219871147962281 ns/iter 0.89
JSON_Object_Defines_Miss_Too_Large 2.7238614160450934 ns/iter 2.873149574703508 ns/iter 0.95
Pointer_Object_Traverse 24.916760489039472 ns/iter 26.074228639243554 ns/iter 0.96
Pointer_Object_Try_Traverse 30.411349501926534 ns/iter 30.651172573737785 ns/iter 0.99
Pointer_Push_Back_Pointer_To_Weak_Pointer 211.99329209763926 ns/iter 171.02545258978157 ns/iter 1.24
Pointer_Walker_Schema_ISO_Language 1767117.8046270176 ns/iter 1799747.0410256402 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/0 1237695.4991180964 ns/iter 1260311.154545558 ns/iter 0.98
Pointer_Maybe_Tracked_Deeply_Nested/1 1684624.0192306319 ns/iter 2152201.1956524057 ns/iter 0.78
Pointer_Position_Tracker_Get_Deeply_Nested 699.9504421302399 ns/iter 747.4743639056445 ns/iter 0.94
URITemplateRouter_Create 32657.883208630265 ns/iter 30412.10921007644 ns/iter 1.07
URITemplateRouter_Match 180.8811936119553 ns/iter 180.34164358406235 ns/iter 1.00
URITemplateRouter_Match_BasePath 211.15841783609298 ns/iter 223.76016948804087 ns/iter 0.94
URITemplateRouterView_Restore 7956.758974635154 ns/iter 8701.999147358367 ns/iter 0.91
URITemplateRouterView_Match 146.45865118979853 ns/iter 144.92060461384298 ns/iter 1.01
URITemplateRouterView_Match_BasePath 164.75568691190952 ns/iter 164.88137427604542 ns/iter 1.00
URITemplateRouterView_Arguments 448.22529671929465 ns/iter 451.2421038982231 ns/iter 0.99
JSONL_Parse_Large 9653868.408450685 ns/iter 9181826.753246088 ns/iter 1.05
JSONL_Parse_Large_GZIP 11247342.112903146 ns/iter 10829198.32812479 ns/iter 1.04
HTML_Build_Table_100000 69801813.39999945 ns/iter 72350684.3999985 ns/iter 0.96
HTML_Render_Table_100000 5364795.423076885 ns/iter 5257775.985074801 ns/iter 1.02
GZIP_Compress_ISO_Language_Set_3_Locations 33691305.6666693 ns/iter 35989724.99999993 ns/iter 0.94
GZIP_Decompress_ISO_Language_Set_3_Locations 4293702.570552107 ns/iter 4294977.189023784 ns/iter 1.00
GZIP_Compress_ISO_Language_Set_3_Schema 1895664.5934961333 ns/iter 2129529.0182929807 ns/iter 0.89
GZIP_Decompress_ISO_Language_Set_3_Schema 353098.1623931775 ns/iter 276515.9159099609 ns/iter 1.28

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark (windows/msvc)

Details
Benchmark suite Current: 42f6e9a Previous: 49a6a84 Ratio
Regex_Lower_S_Or_Upper_S_Asterisk 5.2333150000004025 ns/iter 4.957147000000077 ns/iter 1.06
Regex_Caret_Lower_S_Or_Upper_S_Asterisk_Dollar 5.124465999999757 ns/iter 5.0030999999989945 ns/iter 1.02
Regex_Period_Asterisk 5.335949000000255 ns/iter 4.9513359999991735 ns/iter 1.08
Regex_Group_Period_Asterisk_Group 5.193434000000252 ns/iter 4.967858035714455 ns/iter 1.05
Regex_Period_Plus 4.951895769982869 ns/iter 4.604629286742291 ns/iter 1.08
Regex_Period 4.6386108368247445 ns/iter 4.610691863679587 ns/iter 1.01
Regex_Caret_Period_Plus_Dollar 4.619103795674208 ns/iter 4.602722689591746 ns/iter 1.00
Regex_Caret_Group_Period_Plus_Group_Dollar 4.655770322891986 ns/iter 4.609581037074585 ns/iter 1.01
Regex_Caret_Period_Asterisk_Dollar 5.084530357143942 ns/iter 4.964539000000059 ns/iter 1.02
Regex_Caret_Group_Period_Asterisk_Group_Dollar 5.099511000000803 ns/iter 4.956591000000117 ns/iter 1.03
Regex_Caret_X_Hyphen 8.37801227678625 ns/iter 7.79539174107161 ns/iter 1.07
Regex_Period_Md_Dollar 63.33585000002132 ns/iter 58.81737500000587 ns/iter 1.08
Regex_Caret_Slash_Period_Asterisk 7.902417821862123 ns/iter 7.442366071427184 ns/iter 1.06
Regex_Caret_Period_Range_Dollar 5.5007419999992635 ns/iter 5.311224107141958 ns/iter 1.04
Regex_Nested_Backtrack 74.0896093749959 ns/iter 71.3157477678702 ns/iter 1.04
JSON_Array_Of_Objects_Unique 538.5404000001017 ns/iter 508.67479999988063 ns/iter 1.06
JSON_Parse_1 9449.685938902647 ns/iter 9334.85609439365 ns/iter 1.01
JSON_Parse_Real 18745.179867674757 ns/iter 18071.827043483998 ns/iter 1.04
JSON_Parse_Decimal 11947.617187498594 ns/iter 11206.864285713078 ns/iter 1.07
JSON_Parse_Schema_ISO_Language 8683897.777776413 ns/iter 8036161.333332833 ns/iter 1.08
JSON_Parse_Integer 6082.048214283629 ns/iter 5879.03660714265 ns/iter 1.03
JSON_Parse_String_NonSSO_Plain 8066.377232139084 ns/iter 7846.341517857728 ns/iter 1.03
JSON_Parse_String_SSO_Plain 3688.2340861373214 ns/iter 3635.973150048233 ns/iter 1.01
JSON_Parse_String_Escape_Heavy 21431.7031249891 ns/iter 21143.172189659665 ns/iter 1.01
JSON_Parse_Object_Short_Keys 13333.157142864951 ns/iter 13101.614285716323 ns/iter 1.02
JSON_Parse_Object_Scalar_Properties 6827.188392857611 ns/iter 6732.758035714223 ns/iter 1.01
JSON_Parse_Object_Array_Properties 11486.587500002088 ns/iter 11505.883928569867 ns/iter 1.00
JSON_Parse_Object_Object_Properties 11629.821428568579 ns/iter 11680.32656250162 ns/iter 1.00
JSON_Parse_Nested_Containers 84171.87499998948 ns/iter 83395.11160713187 ns/iter 1.01
JSON_From_String_Copy 66.71191071429153 ns/iter 62.37409598214125 ns/iter 1.07
JSON_From_String_Temporary 81.37478794643422 ns/iter 83.33202008929318 ns/iter 0.98
JSON_Number_To_Double 135.7070892856882 ns/iter 135.89171428573567 ns/iter 1.00
JSON_Object_At_Last_Key/8 7.413651785713324 ns/iter 7.466722321428928 ns/iter 0.99
JSON_Object_At_Last_Key/32 25.51947577894168 ns/iter 26.245181660082046 ns/iter 0.97
JSON_Object_At_Last_Key/128 93.53145118157134 ns/iter 93.94425919891225 ns/iter 1.00
JSON_Object_At_Last_Key/512 430.4005583216697 ns/iter 426.6381875000036 ns/iter 1.01
JSON_Fast_Hash_Helm_Chart_Lock 64.69735491074451 ns/iter 65.23975892857185 ns/iter 0.99
JSON_Equality_Helm_Chart_Lock 316.6575026026814 ns/iter 300.9277766821137 ns/iter 1.05
JSON_Divisible_By_Decimal 355.27302584397324 ns/iter 357.650324002317 ns/iter 0.99
JSON_String_Equal/10 14.364124489446706 ns/iter 14.439485426609798 ns/iter 0.99
JSON_String_Equal/100 26.969547725235937 ns/iter 28.485097320080744 ns/iter 0.95
JSON_String_Equal_Small_By_Perfect_Hash/10 2.1266691270902554 ns/iter 2.1300634374995298 ns/iter 1.00
JSON_String_Equal_Small_By_Runtime_Perfect_Hash/10 15.177187499994764 ns/iter 15.163525378733016 ns/iter 1.00
JSON_String_Fast_Hash/10 4.646244018894785 ns/iter 4.98426170651313 ns/iter 0.93
JSON_String_Fast_Hash/100 4.711868314090959 ns/iter 4.7792388275506905 ns/iter 0.99
JSON_String_Key_Hash/10 4.957501999997476 ns/iter 5.107586999999967 ns/iter 0.97
JSON_String_Key_Hash/100 10.968267187500658 ns/iter 11.02105173651213 ns/iter 1.00
JSON_Object_Defines_Miss_Same_Length 5.006524000000354 ns/iter 5.103982999999062 ns/iter 0.98
JSON_Object_Defines_Miss_Too_Small 4.087887244425715 ns/iter 4.260558750000598 ns/iter 0.96
JSON_Object_Defines_Miss_Too_Large 4.042771087433494 ns/iter 3.8941418819543796 ns/iter 1.04
Pointer_Object_Traverse 71.83286830359593 ns/iter 68.30302455357794 ns/iter 1.05
Pointer_Object_Try_Traverse 68.00412946427669 ns/iter 68.3450892857199 ns/iter 1.00
Pointer_Push_Back_Pointer_To_Weak_Pointer 159.83109374997997 ns/iter 164.48806905052717 ns/iter 0.97
Pointer_Walker_Schema_ISO_Language 8922042.666666433 ns/iter 8842787.777777832 ns/iter 1.01
Pointer_Maybe_Tracked_Deeply_Nested/0 2529533.898305321 ns/iter 2474450.602409731 ns/iter 1.02
Pointer_Maybe_Tracked_Deeply_Nested/1 3960242.780748252 ns/iter 3668085.026738044 ns/iter 1.08
Pointer_Position_Tracker_Get_Deeply_Nested 579.4687500001926 ns/iter 578.7077008927761 ns/iter 1.00
URITemplateRouter_Create 39878.96205358713 ns/iter 39975.915501128875 ns/iter 1.00
URITemplateRouter_Match 196.39749123229674 ns/iter 205.4379461857725 ns/iter 0.96
URITemplateRouter_Match_BasePath 229.0010000000109 ns/iter 229.00567756634715 ns/iter 1.00
URITemplateRouterView_Restore 23689.409716410704 ns/iter 24140.310714285206 ns/iter 0.98
URITemplateRouterView_Match 153.61685267854293 ns/iter 154.3829017857133 ns/iter 1.00
URITemplateRouterView_Match_BasePath 171.74930803573065 ns/iter 172.4667035133809 ns/iter 1.00
URITemplateRouterView_Arguments 571.1482000001524 ns/iter 569.3936607142648 ns/iter 1.00
JSONL_Parse_Large 32738105.26314647 ns/iter 33164404.761908457 ns/iter 0.99
JSONL_Parse_Large_GZIP 33268840.909096815 ns/iter 34439827.272732064 ns/iter 0.97
HTML_Build_Table_100000 100121166.6666677 ns/iter 91863099.9999875 ns/iter 1.09
HTML_Render_Table_100000 9111546.666669406 ns/iter 7872998.888888105 ns/iter 1.16
GZIP_Compress_ISO_Language_Set_3_Locations 37819757.894722946 ns/iter 37808257.89473104 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Locations 10784473.437496444 ns/iter 10553976.000001056 ns/iter 1.02
GZIP_Compress_ISO_Language_Set_3_Schema 2317852.84281051 ns/iter 2317949.2753622956 ns/iter 1.00
GZIP_Decompress_ISO_Language_Set_3_Schema 567691.6964282392 ns/iter 564135.8928571094 ns/iter 1.01

This comment was automatically generated by workflow using github-action-benchmark.

@augmentcode

augmentcode Bot commented Jun 12, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds a small hex-decoding utility to the text module.

Changes:

  • Introduces sourcemeta::core::hex_to_bytes(std::string_view) as a public API returning std::optional<std::string>
  • Implements decoding in src/lang/text/text.cc with an internal hex_digit_value helper
  • Returns nullopt for odd-length inputs or non-hex characters; accepts both upper/lowercase hex
  • Adds a new GTest suite covering empty input, mixed-case decoding, NUL/high bytes, and invalid inputs
  • Updates the text unit-test CMake target to compile the new test file

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@jviotti jviotti merged commit fea6863 into main Jun 12, 2026
13 checks passed
@jviotti jviotti deleted the hex-bytes branch June 12, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant